From 49e9b51df33f8183bd5497cd63b7987bcaae1f64 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 24 Jan 2012 08:42:15 -0500 Subject: [PATCH] gnomeos: Build themes, shared mime info --- gnomeos/3.4/default-icon-theme-autogen.patch | 26 ++++ .../3.4/default-icon-theme-no-builddir.patch | 24 +++ gnomeos/3.4/manifest.json | 19 +++ gnomeos/3.4/shared-mime-info-autogen.patch | 25 +++ gnomeos/3.4/shared-mime-info-parallel.patch | 31 ++++ gnomeos/3.4/tango-icon-naming-python.patch | 147 ++++++++++++++++++ 6 files changed, 272 insertions(+) create mode 100644 gnomeos/3.4/default-icon-theme-autogen.patch create mode 100644 gnomeos/3.4/default-icon-theme-no-builddir.patch create mode 100644 gnomeos/3.4/shared-mime-info-autogen.patch create mode 100644 gnomeos/3.4/shared-mime-info-parallel.patch create mode 100644 gnomeos/3.4/tango-icon-naming-python.patch diff --git a/gnomeos/3.4/default-icon-theme-autogen.patch b/gnomeos/3.4/default-icon-theme-autogen.patch new file mode 100644 index 00000000..b983546d --- /dev/null +++ b/gnomeos/3.4/default-icon-theme-autogen.patch @@ -0,0 +1,26 @@ +From 1a872427e5063dbc09014c09ab13a11e1694343f Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Mon, 23 Jan 2012 19:20:16 -0500 +Subject: [PATCH] autogen.sh: Honor NOCONFIGURE=1 + +See http://people.gnome.org/~walters/docs/build-api.txt +--- + autogen.sh | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/autogen.sh b/autogen.sh +index c4d7701..6d07bb7 100755 +--- a/autogen.sh ++++ b/autogen.sh +@@ -50,7 +50,7 @@ for arg in $*; do + esac + done + +-if $run_configure; then ++if test -z "$NOCONFIGURE" && $run_configure; then + $srcdir/configure --enable-maintainer-mode --config-cache "$@" + echo + echo "Now type 'make' to compile $PROJECT." +-- +1.7.6.5 + diff --git a/gnomeos/3.4/default-icon-theme-no-builddir.patch b/gnomeos/3.4/default-icon-theme-no-builddir.patch new file mode 100644 index 00000000..50737311 --- /dev/null +++ b/gnomeos/3.4/default-icon-theme-no-builddir.patch @@ -0,0 +1,24 @@ +From 59698f4729f384486779efbc8ec7e8c2ecaf548c Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Mon, 23 Jan 2012 21:51:57 -0500 +Subject: [PATCH] build: Note we don't support srcdir != builddir + +--- + configure.ac | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/configure.ac b/configure.ac +index aa5891b..b1a3a8a 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1,5 +1,7 @@ + AC_INIT([hicolor-icon-theme], [0.12]) + ++echo \#buildapi-variable-no-builddir >/dev/null ++ + AC_PROG_INSTALL + + AC_CONFIG_FILES([Makefile]) +-- +1.7.6.5 + diff --git a/gnomeos/3.4/manifest.json b/gnomeos/3.4/manifest.json index ee8ad9ba..53ea9dcc 100644 --- a/gnomeos/3.4/manifest.json +++ b/gnomeos/3.4/manifest.json @@ -11,6 +11,7 @@ "fd-NM": "git:git://anongit.freedesktop.org/git/NetworkManager/", "fd-mesa": "git:git://anongit.freedesktop.org/git/mesa/", "fd-pulse": "git:git://anongit.freedesktop.org/git/pulseaudio/", + "fd-xdg": "git:git://anongit.freedesktop.org/git/xdg/", "fd-p11": "git:git://anongit.freedesktop.org/git/p11-glue/", "fd-gstreamer": "git:git://anongit.freedesktop.org/gstreamer/", "fd-telepathy": "git:git://anongit.freedesktop.org/telepathy/", @@ -519,8 +520,18 @@ "config-opts": ["--disable-packagekit", "--disable-cups"]}, + {"src": "git:git://github.com/stephenc/tango-icon-naming.git", + "patches": ["tango-icon-naming-python.patch"], + "component": "devel"}, + {"src": "gnome:gnome-themes-standard"}, + {"src": "gnome:gnome-icon-theme"}, + + {"src": "gnome:gnome-icon-theme-symbolic"}, + + {"src": "gnome:gnome-icon-theme-extras"}, + {"src": "gnome:gvfs"}, {"src": "gnome:gnome-screensaver"}, @@ -633,6 +644,14 @@ {"src": "gnome:dconf", "patches": ["dconf-builddir.patch"]}, + {"src": "fd-xdg:default-icon-theme", + "patches": ["default-icon-theme-autogen.patch", + "default-icon-theme-no-builddir.patch"]}, + + {"src": "fd-xdg:shared-mime-info", + "patches": ["shared-mime-info-autogen.patch", + "shared-mime-info-parallel.patch"]}, + {"src": "gnome:cantarell-fonts"}, {"src": "fd:accountsservice"}, diff --git a/gnomeos/3.4/shared-mime-info-autogen.patch b/gnomeos/3.4/shared-mime-info-autogen.patch new file mode 100644 index 00000000..60f82e13 --- /dev/null +++ b/gnomeos/3.4/shared-mime-info-autogen.patch @@ -0,0 +1,25 @@ +From 2e486bb8fdfa88801da07357b3d588e1115a0e50 Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Mon, 23 Jan 2012 21:54:43 -0500 +Subject: [PATCH] autogen.sh: Honor NOCONFIGURE=1 + +http://people.gnome.org/~walters/docs/build-api.txt +--- + autogen.sh | 4 +++- + 1 files changed, 3 insertions(+), 1 deletions(-) + +diff --git a/autogen.sh b/autogen.sh +index 1288bfe..1d1ddb9 100755 +--- a/autogen.sh ++++ b/autogen.sh +@@ -53,4 +53,6 @@ do_cmd autoconf + + cd $ORIGDIR || exit $? + +-do_cmd $srcdir/configure --enable-maintainer-mode ${1+"$@"} && echo "Now type \`make' to compile" || exit 1 ++if test -z "$NOCONFIGURE"; then ++ do_cmd $srcdir/configure --enable-maintainer-mode ${1+"$@"} && echo "Now type \`make' to compile" || exit 1 ++fi +-- +1.7.6.5 + diff --git a/gnomeos/3.4/shared-mime-info-parallel.patch b/gnomeos/3.4/shared-mime-info-parallel.patch new file mode 100644 index 00000000..95bdebbe --- /dev/null +++ b/gnomeos/3.4/shared-mime-info-parallel.patch @@ -0,0 +1,31 @@ +From b067134a866f902b685539add5976f807252d93f Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Mon, 23 Jan 2012 22:13:15 -0500 +Subject: [PATCH] build: Don't make all target depend on check + +This breaks parallel make, because the 'check' target depends on the +update-mime-database binary, but that's also listed in bin_PROGRAMS, +and automake's generated rules have $(EXEEXT) on them, so what happens +is make uses the implicit rule. + +And really, make check should just be a separate target. +--- + Makefile.am | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 9c2c36d..0c96439 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -68,7 +68,7 @@ uninstall-hook: + rm -f "$(DESTDIR)$(datadir)/mime/types" + rm -f "$(DESTDIR)$(datadir)/mime/version" + +-all: check create-pot ++all: create-pot + + create-pot: + $(AM_V_GEN) $(MAKE) -C po shared-mime-info.pot +-- +1.7.6.5 + diff --git a/gnomeos/3.4/tango-icon-naming-python.patch b/gnomeos/3.4/tango-icon-naming-python.patch new file mode 100644 index 00000000..f121f8d8 --- /dev/null +++ b/gnomeos/3.4/tango-icon-naming-python.patch @@ -0,0 +1,147 @@ +From 633845ace0e94432af319553328c851485218f98 Mon Sep 17 00:00:00 2001 +From: Colin Walters +Date: Mon, 23 Jan 2012 21:33:52 -0500 +Subject: [PATCH] Port to Python + +Most of the newer GNOME developer utilities are Python, not Perl; +also, nothing else depends on Perl XML::Simple, and the fewer modules +in the OS, the better. +--- + Makefile.am | 9 +++--- + configure.ac | 16 +---------- + icon-name-mapping.py.in | 63 +++++++++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 69 insertions(+), 19 deletions(-) + create mode 100644 icon-name-mapping.py.in + +diff --git a/Makefile.am b/Makefile.am +index baa1c42..d6b051a 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -1,10 +1,9 @@ + + libexec_SCRIPTS = icon-name-mapping + +-%: %.pl.in +- sed -e "s#\@PERL\@#$(PERL)#g" \ +- -e "s#\@DATADIR\@#$(pkgdatadir)#g" \ +- < $< > $@ ++%: %.py.in ++ sed -e "s#\@DATADIR\@#$(pkgdatadir)#g" \ ++ < $< > $@.tmp && mv $@.tmp $@ + + pkgconfig_in_files = \ + icon-naming-utils.pc.in +@@ -17,7 +16,7 @@ dtd_DATA = legacy-icon-mapping.dtd + pkgdata_DATA = legacy-icon-mapping.xml + + EXTRA_DIST = \ +- icon-name-mapping.pl.in \ ++ icon-name-mapping.py.in \ + $(pkgconfig_in_files) \ + $(dtd_DATA) \ + $(pkgdata_DATA) \ +diff --git a/configure.ac b/configure.ac +index b11f8cf..cfc40dc 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -2,26 +2,14 @@ dnl Process this file with autoconf to produce a configure script. + AC_PREREQ(2.52) + + AC_INIT([icon-naming-utils], [0.8.90]) +-AC_CONFIG_SRCDIR(icon-name-mapping.pl.in) ++AC_CONFIG_SRCDIR(icon-name-mapping.py.in) + AC_COPYRIGHT([Copyright 2005-2007 Rodney Dawes]) + + AM_INIT_AUTOMAKE + + AM_MAINTAINER_MODE + +-AC_PATH_PROG(PERL, perl) +-if test -z "$PERL"; then +- AC_MSG_ERROR([perl not found]) +-fi +-if test -z "`$PERL -v | fgrep 'v5.' 2> /dev/null`" -a -z "`$PERL -v | fgrep 'version 5.' 2> /dev/null`"; then +- AC_MSG_ERROR([perl 5.x required for icon-naming-utils]) +-fi +-AC_MSG_CHECKING([for XML::Simple]) +-if `$PERL -e "require XML::Simple" 2>/dev/null`; then +- AC_MSG_RESULT([ok]) +-else +- AC_MSG_ERROR([XML::Simple perl module is required for icon-naming-utils]) +-fi ++AM_PATH_PYTHON([2.7]) + + AC_CONFIG_FILES([ + Makefile +diff --git a/icon-name-mapping.py.in b/icon-name-mapping.py.in +new file mode 100644 +index 0000000..5189b9b +--- /dev/null ++++ b/icon-name-mapping.py.in +@@ -0,0 +1,63 @@ ++#!/usr/bin/env python ++ ++# Copyright 2012 Colin Walters ++# ++# Based on icon-name-mapping.pl: ++# ++############################################################################# ++## Copyright (C) 2005-2007 Novell, Inc. ++## Copyright (C) 2005-2007 Rodney Dawes ++## ++## Authors: Rodney Dawes ++## ++ ++import os ++import sys ++import argparse ++ ++try: ++ import xml.etree.ElementTree as ET ++except ImportError: ++ import elementtree.ElementTree as ET ++ ++pkgdatadir = "@DATADIR@" ++ ++parser = argparse.ArgumentParser() ++parser.add_argument('-c', '--context', required=True) ++ ++args = parser.parse_args(sys.argv[1:]) ++ ++filename = os.path.join(pkgdatadir, "legacy-icon-mapping.xml") ++mapping = ET.parse(open(filename)) ++ ++print "Setting up icon mapping for: %s" % (args.context, ) ++ ++os.chdir(args.context) ++ ++def make_icon_links(icon_node, suffix): ++ icon_name = icon_node['name'] ++ for node in icon_node: ++ if node.tag != 'link': ++ continue ++ link = node ++ link_target = link.text.strip() ++ if not os.path.lexists(link_target): ++ os.symlink(icon_name + suffix, link_target) ++ ++for node in mapping.getroot(): ++ if node.tag != 'context': ++ continue ++ context = node ++ dirname = context.attrib['dir'] ++ for node in context: ++ if node.tag != 'icon': ++ continue ++ icon = node ++ icon_name = icon.attrib['name'] ++ if os.path.isfile(icon_name + '.png'): ++ make_icon_links(icon, '.png') ++ elif os.path.isfile(icon_name + '.svg'): ++ make_icon_links(icon, '.svg') ++ ++ if os.path.isfile(icon_name + '.icon'): ++ make_icon_links(icon, '.icon') +-- +1.7.6.5 + -- 2.30.2